home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC02BusyBox / BusyBox.c / UUtils.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-03  |  1001 b   |  56 lines  |  [04] ASCII Text (0x0000)

  1.  
  2. #include <quickdraw.h>
  3. #include <texttool.h>
  4.  
  5. char    test[80];
  6.  
  7. #if 0
  8.  
  9. /**********************************************************************/
  10.  
  11. void    pdlWait()
  12. {
  13.     unsigned int    i;
  14.  
  15.     for (;;) {
  16.         GrafOff();
  17.         for (;;) {
  18.             for (i = 2; i; i--) {
  19.                 if (*((char *)(0xE0C060 + i)) & 0x80) break;
  20.             }
  21.             if (i) break;
  22.         }
  23.         GrafOn();
  24.         for (; *((char *)(0xE0C060 + i)) & 0x80;) {
  25.             if (*((char *)(0xE0C063 - i)) & 0x80) return;
  26.         }
  27.         if (i == 1) return;
  28.     }
  29. }
  30.  
  31. /**********************************************************************/
  32.  
  33. void    sbug(str)
  34. char    *str;
  35. {
  36.     if (*((char *)0xE0C061) >= 0x80) return;
  37.     InitTextDev(1);
  38.     WriteCString(str);
  39.     pdlWait();
  40. }
  41.  
  42. /**********************************************************************/
  43.  
  44. void    stack()
  45. {
  46.     unsigned int    stk;
  47.  
  48.     asm {
  49.         tsc
  50.         sta stk
  51.     }
  52.     sprintf(test, "stack=%X", stk);
  53.     sbug(test);
  54. }
  55.  
  56. #endif